home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 011 / brutil.arc / README.DOC < prev    next >
Encoding:
Text File  |  1988-06-08  |  14.6 KB  |  464 lines

  1. This diskette contains a set of programs and batch files which I have written
  2. and am making available to anyone who may find them useful.  Most of the
  3. programs are written in Microsoft's MASM assembler language.  For those who
  4. are interested, I have included the source code.  I have either written or
  5. substantially modified these programs.    Some of them were originally derived by
  6. disassembling .COM files, and others were written by other people and modified
  7. by me.
  8.  
  9. The following programs and files are contained on this diskette:
  10.  
  11. Name        Description
  12.  
  13. @CHANGED.BAT    uses a valid WHEREIS file spec, shows how many files
  14.         have the Archive bit set.
  15. @CLEARA.BAT    uses a valid WHEREIS file spec, clears Archive bits for
  16.         matching files.
  17. @CLEARAQ.BAT    same as @CLEARA but requires confirmation for each file.
  18. @COPY.BAT    copies files and supresses generated by normal COPY operation.
  19. @COPYALL.BAT    uses a valid WHEREIS file spec, copies all matching files to
  20.         default drive B: or specified destination.
  21. @COPYALQ.BAT    same as @COPYALL but requires confirmation for each file.
  22. @COPYARC.BAT    uses a valid WHEREIS file spec, copies all matching files with
  23.         Archive bit set to default drive D: or specified destination.
  24. @COPYARQ.BAT    same as @COPYARC but requires confirmation for each file.
  25. @DELALL.BAT    uses a valid WHEREIS file spec, deletes all matching files.
  26. @DELALQ.BAT    same as @delall but requires confirmation for each file.
  27. @ERA.BAT    like normal DEL command but shows names of files to be deleted.
  28. @FILES.BAT    shows specified files with date and time sorted in date and time
  29.         sequence.
  30. @HOWMANY.BAT    uses a valid WHEREIS file spec, shows how many files match.
  31. @MASM.BAT    assembles named file and keeps output .OBJ file.
  32. @MASML.BAT    assembles named file and keeps output .EXE file.
  33. @MASMLE.BAT    assembles named file and keeps output .COM file.
  34. @MASMLEB.BAT    like @MASMLE.BAT but saves .Com file in \BATCH directory.
  35. @MLU.BAT    map lower case mnemonics and operators to upper in MASM source
  36.         files.
  37. @MUL.BAT    map upper case mnemonics operators and comments to lower case in
  38.         MASM source files.
  39. @MULMLU.BAT    like using @MUL and @MLU on the same file.
  40. @MULT.BAT    repeats named command for each occurance of a matching file.
  41. @POPDIR.BAT    return to previously saved directory for specified or default
  42.         drive.
  43. @PUSHDIR.BAT    save current directory for specified or default drive.
  44.         you may also specify a directory to be made current.
  45. @SET.BAT    set variables true in UTIL.ASM include file
  46. @SHOWALL.BAT    uses a valid WHEREIS file spec, displays full path, date, time,
  47.         size in bytes and size in K bytes for all matching files.
  48. @SHOWALQ.BAT        same as @SHOWALL but each match must be confirmed.
  49. @SWAPDIR.BAT    save current directory and return to previously saved directory
  50.         for specified or default drive.
  51. ATTR.ASM    source code for ATTR.COM
  52. ATTR.COM    set or clear file attributes
  53. ATTR.DOC    documentation for ATTR.COM
  54. BLANK.ASM    source code for BLANK.COM
  55. BLANK.COM    quickly erases previously formatted diskettes.
  56. BLANK.DOC    documentation for BLANK.COM
  57. COLOR.ASM    source code for COLOR.COM
  58. COLOR.COM    lets you change foreground, background and border colors easily.
  59. COMBINE.ASM    source code for COMBINE.COM
  60. COMBINE.COM    lets you insert commandline parameters into data while copying
  61.         from standard input to standard output.
  62. COMBINE.DOC    documentation for COMBINE.COM
  63. DDU.ASM     source code for DDU.COM
  64. DDU.COM     "Dangerous" Disk Utility
  65. DDU.DOC     documentation for DDU.COM
  66. FDUMP.ASM    source code for FDUMP.COM
  67. FDUMP.COM    file dump program
  68. FDUMP.DOC    documentation for FDUMP.COM
  69. FILES.ASM    source code for FILES.COM
  70. FILES.COM    simple but versatile file name listing program.
  71. FILES.DOC    documentation for FILES.COM
  72. FORMAT.ASM    source code for FORMAT.COM
  73. FORMAT.COM    pseudo format program to keep you from formatting your hard
  74.         disk accidentally.
  75. INT.ASM     source code for INT.COM
  76. INT.COM     displays addresses for specified interrupts.
  77. KEYDOS.ASM    source code for KEYDOS.COM
  78. KEYDOS.COM    shows DOS key codes for all valid key combinations.
  79. KEYSCAN.ASM    source code for KEYSCAN.COM
  80. KEYSCAN.COM    shows scan codes for all keyboard keys.
  81. KEYSEND.ASM    source code for KEYSEND.COM
  82. KEYSEND.COM    lets you stuff up to 15 keys into DOS's type ahead buffer.
  83. LAST.ASM    source code for LAST.COM
  84. LAST.COM    displays last line or all but last line of standard input
  85.         which may be redirected from an input file.  The output may
  86.         also be redirected to a file.  (see @POPDIR.BAT, @PUSHDIR.BAT
  87.         and @SWAPDIR.BAT
  88. LOG.ASM     source code for LOG.COM
  89. LOG.COM     tests to see if DOS is copying standard output to the printer
  90.         and lets you change it from within a batch file.
  91. MACRO.LIB    multi purpose macro library (used to assemble FDUMP.ASM)
  92. MLU.ASM     source code for MLU.COM
  93. MLU.COM     map lower case mnemonics and operators to upper case in MASM
  94.         source code while copying from stdin to stdout.
  95. MUL.ASM     source code for MUL.COM
  96. MUL.COM     map upper case mnemonics operators and comments to lower case
  97.         in MASM source code while copying from stdin to stdout..
  98. OPTMAC.LIB    option processing macros for FILES.ASM and WHEREIS.ASM
  99. RAM.ASM     source code for RAM.COM
  100. RAM.COM     shows total memory, memory in use and free, and total extended
  101.         memory.
  102. SOUND.ASM    source code for SOUND.COM
  103. SOUND.COM    program to make various sounds through the speaker.
  104. SOUND.DOC    documentation for SOUND.COM
  105. SPACE.ASM    source code for SPACE.COM
  106. SPACE.COM    shows disk free space in bytes, clusters and K.
  107. WHEREIS.ASM    source code for WHEREIS.COM
  108. WHEREIS.COM    locates files by name, attribute(s) or date anywhere on any
  109.         disk.
  110. WHEREIS.DOC    documentation for WHEREIS.COM
  111.  
  112. Many of the programs have their own DOC files and need no further explanation
  113. here.  What follows are brief descriptions of the programs which have no
  114. .DOC files.
  115.  
  116. Many of the batch files described here use some interesting features of DOS
  117. which I have just recently become aware of.  The most interesting is the
  118. ability to substitute the values for environment variable references in
  119. executing batch files.
  120.  
  121. Two variables are assumed to be set for many of these procedures to work
  122. properly:  DDISK (default disk) and VDISK (virtual disk).  These should be set
  123. at the end of your AUTOEXEC.BAT file.
  124.  
  125. Examples:
  126.  
  127. SET DDISK=A:
  128. SET VDISK=C:
  129.  
  130. SET DDISK=C:
  131. SET VDISK=E:
  132.  
  133. @CHANGED.BAT
  134.  
  135. This batch file accepts a valid WHEREIS file specification and displays the
  136. number of matching entries found.
  137.  
  138. Examples:
  139.  
  140. @CHANGED
  141. @CHANGED D:
  142. @CHANGED /E
  143. @CHANGED .DOC
  144.  
  145. @CLEARA.BAT
  146.  
  147. This batch file accepts a valid WHEREIS file specification and clears the
  148. archive file flags for all matching files.  You will be told how many files
  149. would be affected and asked for confirmation.  If you enter Y or y the
  150. operation will proceed.  If you enter N or n it will stop and no files will be
  151. affected.
  152.  
  153. Examples:
  154.  
  155. @CLEARA
  156. @CLEARA D:
  157. @CLEARA /E
  158. @CLEARA .DOC
  159.  
  160. @COPY.BAT
  161.  
  162. This batch file performs the same operation as a standard copy but it supresses
  163. all output to the screen by redirecting it to the NUL device.
  164.  
  165. @COPYALL.BAT
  166.  
  167. This batch file accepts a valid WHEREIS file specification and will by default
  168. copy all matching files to the B: drive or whatever you specify as a second
  169. parameter.  You will be told how many files were found and asked to enter Y or y
  170. to do it or N or n to cancel.
  171.  
  172. Examples:
  173.  
  174. @COPYALL
  175. @COPYALL D:
  176. @COPYALL /E
  177. @COPYALL .DOC
  178. @COPYALL *.* E:
  179. @COPYALL D: E:
  180. @COPYALL /E E:
  181. @COPYALL .DOC E:
  182.  
  183. @COPYALQ.BAT
  184.  
  185. This batch file is similar to @COPYALL but you are asked before copying each
  186. file.  You must enter Y or y to copy or N or n to skip the named file.
  187.  
  188. Examples:
  189.  
  190. @COPYALQ
  191. @COPYALQ D:
  192. @COPYALQ /E
  193. @COPYALQ .DOC
  194. @COPYALQ *.* E:
  195. @COPYALQ D: E:
  196. @COPYALQ /E E:
  197. @COPYALQ .DOC E:
  198.  
  199. @COPYARC.BAT
  200.  
  201. This batch file is similar to @COPYALL but only files with the archive bit are
  202. considered.  The default destination drive is D: instead of B:.
  203.  
  204. Examples:
  205.  
  206. @COPYARC
  207. @COPYARC D:
  208. @COPYARC /E
  209. @COPYARC .DOC
  210. @COPYARC *.* E:
  211. @COPYARC D: E:
  212. @COPYARC /E E:
  213. @COPYARC .DOC E:
  214.  
  215. @COPYARQ.BAT
  216.  
  217. This batch file is similar to @COPYALQ but only files with the archive bit are
  218. considered.  The default destination drive is D: instead of B:.
  219.  
  220. Examples:
  221.  
  222. @COPYARQ
  223. @COPYARQ D:
  224. @COPYARQ /E
  225. @COPYARQ .DOC
  226. @COPYARQ *.* E:
  227. @COPYARQ D: E:
  228. @COPYARQ /E E:
  229. @COPYARQ .DOC E:
  230.  
  231. @DELALL.BAT
  232.  
  233. This batch file accepts a valid WHEREIS file specification and deletes all
  234. matching files.  You are told how many files will be deleted and asked to
  235. enter Y or y to do it or N or n to cancel.
  236.  
  237. Examples:
  238.  
  239. @DELALL .BAK
  240.  
  241. @DELALQ.BAT
  242.  
  243. This batch file is similar to @DELALL but you will be asked to confirm the
  244. operation before each file will be deleted.
  245.  
  246. Examples:
  247.  
  248. @DELALL .BAK
  249.  
  250. @ERA.BAT
  251.  
  252. This batch file operates like the standard DEL or ERASE command but the names of
  253. the files are listed first.
  254.  
  255. @FILES.BAT
  256.  
  257. This batch file prints a sorted directory listing using a valid FILES file
  258. specification.    If no second parameter is supplied, /D is used as an option to
  259. the FILES program so that date and time will be shown and used as the primary
  260. sort key.  If the second parameter is supplied, it is assumed to be a valid
  261. option for the FILES program and will be used instead of /D.  The most typical
  262. uses for this might be to print sorted directories by date (/D), rounded size
  263. (/R), or by size (/S).
  264.  
  265. @HOWMANY.BAT
  266.  
  267. This batch file accepts a valid WHEREIS file specification and tells you the
  268. number of matching files on the specified or current default drive.
  269.  
  270. @MASM.BAT
  271. @MASML.BAT
  272. @MASMLE.BAT
  273. @MASMLEB.BAT
  274.  
  275. These batch files provide the following basic services:
  276. 1.  Assemble a program using MASM
  277. 2.  Assemble and link a program using MASM and LINK
  278. 3.  Assemble and link a program using MASM LINK and EXE2BIN
  279. 4.  Same as #3 but save results on VDISK drive.
  280.  
  281. @MLU.BAT
  282.  
  283. This batch file changes lower case MASM source files to upper case.  It
  284. ignores comments and quoted strings enclosed by both kinds of quotation marks
  285. (') and (").
  286.  
  287. @MUL.BAT
  288.  
  289. This batch file changes upper case MASM source filesto lower case.  It ignores
  290. Quoted strings.  Used with @MLU it can ensure that nmemonics and labels are
  291. in upper case while comments are kept in lower case.
  292.  
  293. @MULMLU.BAT
  294.  
  295. This batch file does just what was described above.  It uses MUL and MLU to
  296. do the two operations.
  297.  
  298. @MULT.BAT
  299.  
  300. This batch file allows you to perform the same operation on more than one file.
  301. The first parameter is the procedure to use and the second is the ambiguous
  302. file name.  The procedure is executed once for each matching file.
  303.  
  304. Example:
  305.  
  306. @MULT @MULMLU *.ASM
  307.  
  308. This example will execute the @MULMLU.BAT procedure once for each .ASM file
  309. found in the current directory.
  310.  
  311. @POPDIR.BAT
  312.  
  313. This batch file retrieves the last directory saved by an execution of the
  314. @PUSHDIR.BAT procedure.  It and @PUSHDIR use a file named %1\DIRFILE
  315. which is an ASCII file containing one line for each execution of @PUSHDIR.
  316. @POPDIR removes the last line and makes it into a change directory command then
  317. executes it and tells you to which directory you have been moved.
  318.  
  319. @PUSHDIR.BAT
  320.  
  321. This batch file saves the current default default directory for the default
  322. drive or the one specified as the first parameter.  If a second parameter is
  323. given, it will be used as the directory to change to.
  324.  
  325. @SET.BAT
  326.  
  327. This batch file lets you create a file called UTIL.LIB which contains
  328. statements setting all variables mentioned as parameters to TRUE.  This file
  329. may then be included in a MASM source file to control assembly of conditional
  330. code.
  331.  
  332. @SHOWALL.BAT
  333.  
  334. This batch file uses WHEREIS to find all matching files and FILES to show
  335. all information about them.  Any file spec valid for WHEREIS is acceptable.
  336.  
  337. Example:
  338.  
  339. @SHOWALL /E
  340.  
  341. This would show all information about all files on the default drive which
  342. have been changed today.
  343.  
  344. @SWAPDIR.BAT
  345.  
  346. This batch file is similar to @POPDIR.BAT but the current directory is saved
  347. immediately before changing to the last previous directory.  With this procedure
  348. you may easily switch between two directories (the current directory and the
  349. most recently saved directory).
  350.  
  351. COLOR.ASM
  352.  
  353. Source code for COLOR.COM
  354.  
  355. COLOR.COM
  356.  
  357. This program lets you change foreground background and border colors on your
  358. screen.  Run it with no parameters to see the syntax and choices.
  359.  
  360. FORMAT.ASM
  361.  
  362. Source code for FORMAT.COM
  363.  
  364. FORMAT.COM
  365.  
  366. This program is run in place of the real FORMAT program.  It makes sure that
  367. you specify a drive and that the specified drive is either A: or B:.  The
  368. real FORMAT.COM program must be renamed to REALFM.COM.
  369.  
  370. INT.ASM
  371.  
  372. Source code for INT.COM
  373.  
  374. INT.COM
  375.  
  376. This program shows the segment and offset addresses associated with the
  377. specified interrupt (hex).
  378.  
  379. KEYDOS.ASM
  380.  
  381. Source code for KEYDOS.COM
  382.  
  383. KEYDOS.COM
  384.  
  385. This program shows the shift keys, scan code and if any, the ascii code for
  386. any key you press.  Press any key combination twice to terminate.
  387.  
  388. KEYSCAN.ASM
  389.  
  390. Source code for KEYSCAN.COM
  391.  
  392. KEYSCAN.COM
  393.  
  394. This program shows the "raw" key codes (directly from the keyboard).  To
  395. terminate, press the escape key until a message appears and then release it.
  396.  
  397. KEYSEND.ASM
  398.  
  399. Source code for KEYSEND.COM
  400.  
  401. KEYSEND.COM
  402.  
  403. This program lets you enter quoted strings or hex values for keys to store
  404. in the system's type ahead buffer.
  405.  
  406. LAST.ASM
  407.  
  408. Source code for LAST.COM
  409.  
  410. LAST.COM
  411.  
  412. This program reads from standard input and writes to standard output.  With
  413. no parameters, just the last line from the file is written.  If a single hyphen
  414. is entered as a parameter, all but the last line is written.  Both
  415. applications of this program are seen in the @POPDIR.BAT file.
  416.  
  417. LOG.ASM
  418.  
  419. Source code for LOG.COM
  420.  
  421. LOG.COM
  422.  
  423. This program lets you see if the printer has been activated using ctrl-P from
  424. a batch file.  It also lets you force the printer to be active or inactive by
  425. specifying ON or OFF.  ERRORLEVEL is set nonzero if the printer is active.
  426.  
  427. MLU.ASM
  428.  
  429. Source code for MLU.COM
  430.  
  431. MLU.COM
  432.  
  433. This program reads from standard input and writes to standard output.  It
  434. works as described under @MLU.BAT.
  435.  
  436. MUL.ASM
  437.  
  438. Source code for MUL.COM
  439.  
  440. MUL.COM
  441.  
  442. This program reads from standard input and writes to standard output.  It works
  443. as described under @MUL.BAT
  444.  
  445. RAM.ASM
  446.  
  447. Source code for RAM.COM
  448.  
  449. RAM.COM
  450.  
  451. This program generally describes memory use. it shows total memory, memory in
  452. use and memory free.  It also shows how much (if any) extended memory is
  453. available.
  454.  
  455. SPACE.ASM
  456.  
  457. Source code for SPACE.COM
  458.  
  459. SPACE.COM
  460.  
  461. This program describes free space on the specified or default drive in terms of
  462. bytes K and blocks (allocation units or clusters).
  463. rogram describes free space on the specified or default drive in terms of
  464. bytes K and blocks (allocation units or clust